﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PagingAuthor.ascx.cs"
    Inherits="Webparts_Templates_truyen_PagingAuthor" %>

<span class="tit_cate">
    <%=Config.DisplayTitle %>
</span>
<div class="ds_tg">
    <div class="tim_tg">
        <div class="tk_tg">
            <input type="text" id="txtKeyAuth" class="nd_tk" placeholder="Tìm tác giả" value="<%=Request["key"] %>" />
            <input type="button" class="btn_tk" onclick="js: onSearch('#txtKeyAuth');"/>
        </div>
        <a href="/tac-gia/">Xem tất cả</a>
    </div>

    <ul class="list_tg">
        <asp:Repeater ID="Items" runat="server">
            <ItemTemplate>
                <li>
                    <a href="<%#Eval("Url")%>">Tác giả: <strong><%#Eval("DisplayFullName")%></strong></a>
                </li>
            </ItemTemplate>
        </asp:Repeater>
    </ul>
    
    <div class="tim_tg">
        <div class="tk_tg">
            <input type="text" id="txtKeyAuth2" class="nd_tk" placeholder="Tìm tác giả" value="<%=Request["key"] %>" />
            <input type="button" class="btn_tk" onclick="js: onSearch('#txtKeyAuth2');"/>
        </div>
        <a href="/tac-gia/">Xem tất cả</a>
    </div>
    
    <asp:PlaceHolder runat="server" ID="phPagingBottom"></asp:PlaceHolder>
</div>

<br class="clear" />
<br class="clear" />
<% if (!Portal.Core.Utils.MyCheck.IsMobileClient())
   { %>
<div id="fb-block">
    <div class="fb-comments" data-href="http://comic.truyengicungco.com" data-width="650" data-num-posts="5"></div>
</div>
<% } %>
<script type="text/javascript">
    jQuery(document).ready(function ($) {
        $('#txtKeyAuth').keypress(function (e) {
            if (e.keyCode == 13) {
                onSearch(this);
                return false;
            }
        });
        $('#txtKeyAuth2').keypress(function (e) {
            if (e.keyCode == 13) {
                onSearch(this);
                return false;
            }
        });
    });
    function onSearch(item) {
        var key = $(item).val().trim();
        if (key.length > 0)
            window.location = "/tac-gia/key-" + key + "/";
    }
</script>
<br class="clear" />
